//
// Created by Jisam on 01/10/2024 5:09 PM.
// Solution of  b
#include <bits/stdc++.h>

#define  int long long
#define  endl "\n"
using namespace std;
const int N = 1e8;

signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    int T = 1;
    cin >> T;
    while(T --){
        int k;
        cin >> k;
        cout << k + signed(sqrtl(k) + 0.5) <<endl;
    }

    return 0;
}